package com.sdp.wx.db.wx_repair_team_worker.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sdp.core.bizc.db.IViewQuery;
import com.sdp.wx.db.wx_repair_team_worker.entity.WxRepairTeamWorker;
import com.sdp.wx.db.wx_repair_team_worker.mapper.WxRepairTeamWorkerMapper;
import com.sdp.wx.db.wx_repair_team_worker.service.IWxRepairTeamWorkerService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zsp
 * @since 2024-02-18
 */
@Service
public class WxRepairTeamWorkerServiceImpl extends ServiceImpl<WxRepairTeamWorkerMapper, WxRepairTeamWorker> implements IWxRepairTeamWorkerService,IViewQuery {

	@Autowired
	private WxRepairTeamWorkerMapper wxRepairTeamWorkerMapper;
	
	@Override
	public <T> List<T> viewList(QueryWrapper<T> queryWrapper) {
		// TODO Auto-generated method stub
		return wxRepairTeamWorkerMapper.viewList(queryWrapper);
	}

	@Override
	public <T> int viewCount(QueryWrapper<T> queryWrapper) {
		// TODO Auto-generated method stub
		return wxRepairTeamWorkerMapper.viewCount(queryWrapper);
	}

	@Override
	public <T> IPage<T> viewPage(IPage<T> page, QueryWrapper<T> queryWrapper) {
		// TODO Auto-generated method stub
		return wxRepairTeamWorkerMapper.viewPage(page, queryWrapper);
	}

	@Override
	public List<WxRepairTeamWorker> queryWorkerByTeamId(String teamId) {
		LambdaQueryWrapper<WxRepairTeamWorker> queryWrapper = new LambdaQueryWrapper<>();
		queryWrapper.eq(WxRepairTeamWorker::getTeamId, teamId);
		return list(queryWrapper);
	}

}
